Move a few classes around for easier ownership control

Bug: 128547723
Test: rebuild
Change-Id: I8f0dcf30fee44eaae60e10510620fb518cded68f
This commit is contained in:
Fan Zhang
2019-03-15 15:10:16 -07:00
parent 6a312ab57a
commit 5db43105e8
4 changed files with 5 additions and 3 deletions

View File

@@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.applications.specialaccess.zenaccess;
import android.app.ActivityManager;
import android.content.Context;
import com.android.settings.core.BasePreferenceController;
public class ZenAccessController extends BasePreferenceController {
private final ActivityManager mActivityManager;
public ZenAccessController(Context context, String preferenceKey) {
super(context, preferenceKey);
mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
}
@Override
public int getAvailabilityStatus() {
return !mActivityManager.isLowRamDevice()
? AVAILABLE_UNSEARCHABLE
: UNSUPPORTED_ON_DEVICE;
}
}